package game.entity.item;

import edu.monash.fit2099.engine.Location;
import game.entity.actor.Allosaurs;
import game.entity.actor.Brachiosaur;
import game.entity.actor.Stegosaur;

public class DeadBody<T> extends PortableItem{
    T target;
    private int turn =0;
    private int disappearTurn;

    public DeadBody(String name, char displayChar) {
        super(name, displayChar);
        if(target instanceof Stegosaur || target instanceof Allosaurs){
            disappearTurn = 20;
        }else{
            disappearTurn = 40;
        }
    }

    @Override
    public void tick(Location currentLocation) {

        if(turn == disappearTurn){
            currentLocation.removeItem(this);
        }
    }
}
